% igeta.m

% given b, x, and sig,  gives a_t and aNs 
% a_t = (1/|I(t)|) x Sum_{i \in I(t)} y_it - b_t x_i

for q=1:ka,
  if bbon(q) == 1,
    tind = find(t== BeginYear-1+q); % First year is BeginYear
    tind1 = zeros(Ns,1);
    tind1(tind) = OneNs(tind);
    dl=tind1'*(y-b(q)*xNs);
    a(q)=dl/It(q);
  end;
end;

igetans;


